#ifndef WXSTOOL_H
#define WXSTOOL_H

#include "wxsparent.h"
#include "wxsflags.h"

using namespace wxsFlags;


class wxsTool: public wxsParent {
  public:


    static const long flTool = flVariable | flSubclass | flExtraCode;


    wxsTool(
      wxsItemResData* Data,
      const wxsItemInfo* Info,
      const wxsEventDesc* EventArray = 0,
      const wxsStyleSet* StyleSet = 0,
      long PropertiesFlags = flTool );


    inline bool CanAddToResource( wxsItemResData* Data, bool ShowMessage = false ) { return OnCanAddToResource( Data, ShowMessage ); }

  protected:


    virtual void OnEnumToolProperties( long Flags ) = 0;


    virtual void OnAddToolQPP( wxsAdvQPP* ) { }


    virtual bool OnCanAddToResource( wxsItemResData* Data, bool ShowMessage );

  private:


    virtual void OnEnumItemProperties( long Flags );


    virtual void OnAddItemQPP( wxsAdvQPP* QPP );


    virtual wxsTool* ConvertToTool() { return this; }


    virtual wxObject* OnBuildPreview( wxWindow*, long ) { return 0; }
};



#endif
